<template>
	<view class="ys">
		<view class="detail">
			<view class="content" v-html="content">

			</view>
		</view>
	</view>
</template>

<script>
	import {
		getPolicy
	} from "@/api/api.js"
	export default {
		data() {
			return {
				type: '',
				content: ''
			}
		},
		onLoad(e) {
			if (e.type) {
				this.type = e.type
				this.getPolicy()
			}
		},
		methods: {
			getPolicy() {
				getPolicy({
					type: this.type
				}).then(res => {
					if (res.code == 0) {
						this.content = res.data
					} else {
						uni.$showMsg(res.msg)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #f3f5f8;
		box-sizing: border-box;
		padding: 10px 0;
		box-sizing: border-box;
	}

	.detail {
		background: #fff;
		border-radius: 8px;
		width: 96%;
		margin: 0 auto;
		padding: 10px;
		box-sizing: border-box;

		.title {
			font-weight: bold;
			font-size: 17px;
			text-align: center;
			padding: 10px 0;
		}

		.time {
			color: #777;
			text-align: center;
			font-size: 14px;
		}

		.content {
			margin-top: 10px;
		}
	}
</style>